enum Gender { MALE, FEMALE }

class Person {
	String name;
	Gender gender;
	int age;
	
	Person(String name, Gender gender, int age) {
		this.name = name;
		this.gender = gender;
		this.age = age;
	}

	public String toString() {
		String str = "";

		str += name;
		str += " ";
		str += gender;
		str += " ";
		str += age;
		
		return str;
	}	
}

enum AcademicRank { LECTURER, PROFESSOR }
enum Department { COMPUTER, MATH}

class Teacher extends Person {
	AcademicRank academicRank;
	Department department;

	Teacher(String name, Gender gender, int age, AcademicRank academicRank, Department department) {
		super(name, gender, age);
		this.academicRank = academicRank;
		this.department = department;
	}

	public String toString() {
		String str = "";
		str += super.toString();
		str += " ";
		str += academicRank;
		str += " ";
		str += department;

		return str;
	}
}


//class Student extends Person {
//	Student() {
		
//	}
//}

class Main {
	public static void main(String[] args) {
		Person p = new Teacher("dyn", Gender.MALE, 41, AcademicRank.LECTURER, Department.COMPUTER);
		System.out.println(p);
		
	}
}
